<!DOCTYPE html>
{php}header('Access-Control-Allow-Origin: *');{/php}
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{$roomname} - 会直播</title>
    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
</head>

<body>
    <nav class="navbar navbar-default navbar-fixed-top navbar-fixed-top">
        <div class="container">
            <ul class="nav navbar-nav">
                <li><a class="glyphicon glyphicon-chevron-left" aria-hidden="true" href="javascript:history.back(-1);"> 返回上一级</a></li>
            </ul>
        </div>
    </nav>
    <div class="container" style="padding-top: 60px;">
        <div class="alert alert-warning alert-dismissible" role="alert" style="margin-top: -5px;">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <p><strong>Warning!</strong> 记得点击“全屏”观看</p>
            <p><strong>Warning!</strong> 播放器出现No compatible source was found for this media.或不支持该视频格式的，请允许当前浏览器使用Flash，推荐使用Google Chrome播放。该视频格式手机将无法播放</p>
        </div>
    </div>
    {eq name="rid" value="1"}
    <div class="container" style="padding-top: 10px;padding-bottom: 100px;">
        <link rel="stylesheet" href="__PUBLIC__static/DPlayer.min.css">
        <div id="dplayer" style="width: 50%; height: 50%;" class="center-block"></div>
        <script src="__PUBLIC__static/flv.min.js"></script>
        <script src="__PUBLIC__static/DPlayer.min.js"></script>
        <script>
            const dp = new DPlayer({
            container: document.getElementById('dplayer'),
            live: 'true',
            autoplay: 'true',
            theme: '#FADFA3',
            video: {
                url: '{$url}',
                type: 'flv'
            }
        });
        </script>
    </div>
    {else/}
    <link href="http://vjs.zencdn.net/5.20.1/video-js.css" rel="stylesheet">
    <script src="http://vjs.zencdn.net/5.20.1/videojs-ie8.min.js"></script>
    <div class="container" style="padding-top: 10px;padding-bottom: 100px;">
        <video id="video_1" class="video-js vjs-default-skin" controls preload="auto" autoplay="autoplay" width="980" height="680" poster="http://vjs.zencdn.net/v/oceans.png" data-setup="{}">
            <!-- <source src="1.mp4" type="video/mp4"> -->
            <source src="{$url}" type="rtmp/flv">
            <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
        </video>
        <script src="http://vjs.zencdn.net/5.20.1/video.js"></script>
    </div>
    {/eq}
    {include file="index/footer" /}
</body>

</html>